package za.org.jcicada.datastore.impl;

import java.util.ArrayList;
import java.util.Date;

import za.org.jcicada.datastore.IDataStoreClient;
import za.org.jcicada.genss.messages.Result;
import za.org.jcicada.genss.sensor.ISensorValue;
import za.org.jcicada.genss.sensor.SensorURN;
import za.org.jcicada.genss.sensor.impl.SensorStatusValue;

public class MockDataStoreServer extends DataStoreServerAbstract {

	public SensorURN sensorURN;
	public ISensorValue value;
	public SensorStatusValue statusValue;
	
	@Override
	public void storeSensor(SensorURN sensorURN, ISensorValue value) {
		this.sensorURN = sensorURN;
		this.value = value;
	}
	
	@Override
	public void storeSensorStatus(SensorURN sensorURN, SensorStatusValue statusValue) {
		this.sensorURN = sensorURN;
		this.statusValue = statusValue;
	}

	public void retrieveSensorHistory(IDataStoreClient client, SensorURN sensorURN, Date from, Date to) {
		client.replySensorHistory(new Result(), sensorURN, from, to, new ArrayList<ISensorValue>());
	}
	
	public void retrieveStatusHistory(IDataStoreClient client, SensorURN sensorURN, Date from, Date to) {
		client.replyStatusHistory(new Result(), sensorURN, from, to, new ArrayList<SensorStatusValue>());
	}

}
